home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Grafik & Text & Film / Quark XTensions / Freeware Xtensions / Quark AppleScript Scripts / Scripts (text only) / Set Default Page View < prev    next >
Text File  |  1994-05-02  |  865b  |  28 lines

  1. --Copyright 1994 Quark, Inc.   All rights reserved.
  2.  
  3.  
  4. tell application "QuarkXPress™"
  5.     tell default document 1
  6.         set vs to view scale
  7.         set x to display dialog "                       Select Default Page View" buttons {"100%", "Fit In Window", "Custom"} default button 3
  8.         if button returned of x = "Fit In Window" then
  9.             set view scale to fit page in window
  10.         else if button returned of x = "100%" then
  11.             set view scale to "100%"
  12.         else
  13.             set i to false
  14.             repeat until i is true
  15.                 set y to text returned of (display dialog "Enter a view percentage between 10% and 400%" default answer vs with icon note)
  16.                 try
  17.                     set view scale to y
  18.                     set i to true
  19.                 on error
  20.                     display dialog "Value must be between 10% and 400%." with icon stop buttons {"OK"} default button 1
  21.                     set i to false
  22.                 end try
  23.             end repeat
  24.         end if
  25.     end tell
  26.     activate
  27. end tell
  28.